home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / DriverFamilyMatching.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.7 KB  |  184 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        DriverFamilyMatching.p
  3.  
  4.      Contains:    Interfaces for create native drivers NDRV
  5.  
  6.      Version:    Technology:    
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT DriverFamilyMatching;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRIVERFAMILYMATCHING__}
  28. {$SETC __DRIVERFAMILYMATCHING__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DriverFamilyMatchingIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __NAMEREGISTRY__}
  38. {$I NameRegistry.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __CODEFRAGMENTS__}
  41. {$I CodeFragments.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. {
  50.   ##############################################
  51.    Well known properties in the Name Registry
  52.   ##############################################
  53. }
  54. { CPassThru }
  55. {
  56.   #########################################################
  57.    Descriptor for Drivers and NDRVs
  58.   #########################################################
  59. }
  60.     QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
  61.     Use Mac prefix to avoid collision 
  62. }
  63. { Driver Typing Information Used to Match Drivers With Devices }
  64.  
  65. TYPE
  66.     MacDriverTypePtr = ^MacDriverType;
  67.     MacDriverType = RECORD
  68.         nameInfoStr:            Str31;                                    {  Driver Name/Info String }
  69.         version:                NumVersion;                                {  Driver Version Number }
  70.     END;
  71.  
  72. {$IFC TARGET_OS_MAC }
  73.     DriverType                            = MacDriverType;
  74.     DriverTypePtr                         = ^DriverType;
  75. {$ENDC}  {TARGET_OS_MAC}
  76.  
  77. { OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment }
  78.     RuntimeOptions                        = OptionBits;
  79.  
  80. CONST
  81.     kDriverIsLoadedUponDiscovery = $00000001;                    {  auto-load driver when discovered }
  82.     kDriverIsOpenedUponLoad        = $00000002;                    {  auto-open driver when loaded }
  83.     kDriverIsUnderExpertControl    = $00000004;                    {  I/O expert handles loads/opens }
  84.     kDriverIsConcurrent            = $00000008;                    {  supports concurrent requests }
  85.     kDriverQueuesIOPB            = $00000010;                    {  device manager doesn't queue IOPB }
  86.     kDriverIsLoadedAtBoot        = $00000020;                    {  Driver is loaded at the boot time  }
  87.     kDriverIsForVirtualDevice    = $00000040;                    {  Driver is for a virtual Device  }
  88.     kDriverSupportDMSuspendAndResume = $00000080;                {  Driver supports Device Manager Suspend and Resume command  }
  89.  
  90.  
  91. TYPE
  92.     DriverOSRuntimePtr = ^DriverOSRuntime;
  93.     DriverOSRuntime = RECORD
  94.         driverRuntime:            RuntimeOptions;                            {  Options for OS Runtime }
  95.         driverName:                Str31;                                    {  Driver's name to the OS }
  96.         driverDescReserved:        ARRAY [0..7] OF UInt32;                    {  Reserved area }
  97.     END;
  98.  
  99. { OS Service Information Used To Declare What APIs a Driver Supports }
  100.     ServiceCount                        = UInt32;
  101.     DriverServiceInfoPtr = ^DriverServiceInfo;
  102.     DriverServiceInfo = RECORD
  103.         serviceCategory:        OSType;                                    {  Service Category Name }
  104.         serviceType:            OSType;                                    {  Type within Category }
  105.         serviceVersion:            NumVersion;                                {  Version of service }
  106.     END;
  107.  
  108.     DriverOSServicePtr = ^DriverOSService;
  109.     DriverOSService = RECORD
  110.         nServices:                ServiceCount;                            {  Number of Services Supported }
  111.         service:                ARRAY [0..0] OF DriverServiceInfo;        {  The List of Services (at least one) }
  112.     END;
  113.  
  114. { Categories }
  115.  
  116. CONST
  117.     kServiceCategoryDisplay        = 'disp';                        {  Display Manager }
  118.     kServiceCategoryOpenTransport = 'otan';                        {  Open Transport }
  119.     kServiceCategoryBlockStorage = 'blok';                        {  Block Storage }
  120.     kServiceCategoryNdrvDriver    = 'ndrv';                        {  Generic Native Driver }
  121.     kServiceCategoryScsiSIM        = 'scsi';                        {  SCSI  }
  122.     kServiceCategoryFileManager    = 'file';                        {  File Manager  }
  123.     kServiceCategoryIDE            = 'ide-';                        {  ide  }
  124.     kServiceCategoryADB            = 'adb-';                        {  adb  }
  125.     kServiceCategoryPCI            = 'pci-';                        {  pci bus  }
  126.                                                                 {  Nu Bus  }
  127.     kServiceCategoryDFM            = 'dfm-';                        {  DFM  }
  128.     kServiceCategoryMotherBoard    = 'mrbd';                        {  mother Board  }
  129.     kServiceCategoryKeyboard    = 'kybd';                        {  Keyboard  }
  130.     kServiceCategoryPointing    = 'poit';                        {  Pointing  }
  131.     kServiceCategoryRTC            = 'rtc-';                        {  RTC  }
  132.     kServiceCategoryNVRAM        = 'nram';                        {  NVRAM  }
  133.     kServiceCategorySound        = 'sond';                        {  Sound (1/3/96 MCS)  }
  134.     kServiceCategoryPowerMgt    = 'pgmt';                        {  Power Management  }
  135.     kServiceCategoryGeneric        = 'genr';                        {  Generic Service Category to receive general Events  }
  136.  
  137. { Ndrv ServiceCategory Types }
  138.     kNdrvTypeIsGeneric            = 'genr';                        {  generic }
  139.     kNdrvTypeIsVideo            = 'vido';                        {  video }
  140.     kNdrvTypeIsBlockStorage        = 'blok';                        {  block storage }
  141.     kNdrvTypeIsNetworking        = 'netw';                        {  networking }
  142.     kNdrvTypeIsSerial            = 'serl';                        {  serial }
  143.     kNdrvTypeIsParallel            = 'parl';                        {  parallel  }
  144.     kNdrvTypeIsSound            = 'sond';                        {  sound }
  145.     kNdrvTypeIsBusBridge        = 'brdg';
  146.  
  147.  
  148. TYPE
  149.     DriverDescVersion                    = UInt32;
  150. {    The Driver Description }
  151.  
  152. CONST
  153.     kInitialDriverDescriptor    = 0;
  154.     kVersionOneDriverDescriptor    = 1;
  155.  
  156.     kTheDescriptionSignature    = 'mtej';
  157.     kDriverDescriptionSignature    = 'pdes';
  158.  
  159.  
  160.  
  161. TYPE
  162.     DriverDescriptionPtr = ^DriverDescription;
  163.     DriverDescription = RECORD
  164.         driverDescSignature:    OSType;                                    {  Signature field of this structure }
  165.         driverDescVersion:        DriverDescVersion;                        {  Version of this data structure }
  166.         driverType:                MacDriverType;                            {  Type of Driver }
  167.         driverOSRuntimeInfo:    DriverOSRuntime;                        {  OS Runtime Requirements of Driver }
  168.         driverServices:            DriverOSService;                        {  Apple Service API Membership }
  169.     END;
  170.  
  171.  
  172.  
  173. {$ALIGN RESET}
  174. {$POP}
  175.  
  176. {$SETC UsingIncludes := DriverFamilyMatchingIncludes}
  177.  
  178. {$ENDC} {__DRIVERFAMILYMATCHING__}
  179.  
  180. {$IFC NOT UsingIncludes}
  181.  END.
  182. {$ENDC}
  183.